package lightswitch.server.code.extendedcontrol;

import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class BackgroundPanel extends JPanel{
    public ImageIcon icon = null;
    public void setBG(String path){
        icon = new ImageIcon(path);
    }
    public void paintComponent (Graphics g)
    {
        super.paintComponent(g);
        Graphics2D g2d = (Graphics2D) g;
        g2d.drawImage(icon.getImage(), 0,0, null);
    }
}
